<h1>Editing story</h1>

<%= error_messages_for :story %>

<% form_for(:story, :url => stories_path) do |f| %>
  <p>
    <b>Author</b><br />
     <%= select("story", "author_id", Author.find(:all).collect {|a| [ a.name, a.id ] }, { :include_blank => true }) %>
  </p>

  <b>Title</b><br />
    <%= f.text_field :title %>
  </p>

    <p>
    <b>Issue</b><br />
     <%= select("story", "issue_id", Issue.find(:all).collect {|i| [ i.description, i.id ] }, { :include_blank => true }) %>
  </p>

  <p>
    <b>Page</b><br />
    <%= f.text_field :page %>
  </p>

  <p>
    <b>Page count</b><br />
    <%= f.text_field :page_count %>
  </p>

  <p>
    <b>Summary</b><br />
    <%= f.text_area  :summary, :rows => 12, :columns => 30  %>
  </p>

  <p>
    <b>Story type</b><br />
     <%= select("story", "story_type_id", StoryType.find(:all).collect {|st| [ st.name, st.id ] }, { :include_blank => true }) %>
  </p>

  <p>
    <%= submit_tag "Create" %>
  </p>
<% end %>

<%= link_to 'Show', story_path(@story) %> |
<%= link_to 'Back', stories_path %>